package top.csy8888.likework.mapper;

import org.apache.ibatis.annotations.Param;
import top.csy8888.likework.entity.Like;

import java.util.List;

/**
 * @author CSY
 * @date 2025 - 10 - 12
 */
public interface LikeMapper {
    /**
     * 添加点赞记录
     * @param like
     */
    void insert(Like like);

    /**
     * 删除点赞记录
     * @param userId
     * @param postId
     */
    void delete(@Param("userId") Integer userId,@Param("postId") Integer postId);

    /**
     * 获取指定帖子的所有点赞记录
     * @param postId
     * @return
     */
    List<Like> listLikeByPostId(Integer postId);


}
